public class VarParameterExercise
{
	public static void main(String[] args)
	{
		HspMethod hm = new HspMethod();
		System.out.println(hm.showScore("mike",80,90,100));
		System.out.println(hm.showScore("jerry",85,80,77,99));
	}
}

class HspMethod
{
	public String showScore(String name,double... scores)
	{
		int totalScore = 0;
		for(int i = 0;i < scores.length;i++)
			totalScore += scores[i];
		return "姓名:" + name + "\t" + scores.length + "门课的" + "总分:" + totalScore;
	}
}